﻿using System;

using System.Threading;

namespace Chapter1

{

    public static class Program

    {

        public static void ThreadMethod()

        {

            for (int i = 0; i < 10; i++)

            {
                Thread.Sleep(2000);

                Console.WriteLine("ThreadProc: {0}", i); 



            }

        }

        public static void Main()

        {

            Thread t = new Thread(new ThreadStart(ThreadMethod));

            t.Start();

            for (int i = 0; i < 4; i++)

            {

                Thread.Sleep(4000);
                Console.WriteLine("Main thread: Do some work.");


            }

            //t.Join();


        }

    }

}
